package com.yang.mall.controller.admin;

import com.yang.mall.dto.LoginDTO;
import com.yang.mall.entity.OLResponse;
import com.yang.mall.service.ISysUserService;
import com.yang.mall.vo.MemberVO;
import com.yang.mall.vo.SysUserVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className SysUserAdminController
 * @Author kadorlin
 * @date 2022/10/24 15:41
 */
@Api(tags = "【PC】用户模块")
@RestController
@RequestMapping("/admin/user")
public class SysUserAdminController {


    @Autowired
    private ISysUserService sysUserService;

    @PostMapping(value = "/login")
    @ApiOperation(value = "密码登录")
    public OLResponse login(@RequestBody LoginDTO loginDTO) {
        SysUserVO sysUserVO = sysUserService.login(loginDTO);
        return new OLResponse().success(sysUserVO);
    }


}
